package com.aj.activity.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.aj.activity.R;

public class LeftMenberView extends LinearLayout {

	private Button mButton;

	private ImageView line;

	private Button add_home_button;

	public LeftMenberView(Context context) {
		super(context);
		initDraw(context);
	}

	public LeftMenberView(Context context, AttributeSet attrs) {
		super(context, attrs);
		initDraw(context);
	}

	private void initDraw(Context context) {
		View view = LayoutInflater.from(context).inflate(
				R.layout.left_member_layout, this, false);
		mButton = (Button) view.findViewById(R.id.mVerticalTextView);
		add_home_button = (Button) view.findViewById(R.id.add_home_button);
		line = (ImageView) view.findViewById(R.id.line);
		this.addView(view);
	}

	public void setText(CharSequence text) {
		mButton.setText(text);
	}

	public void setText(int resid) {
		mButton.setText(resid);
	}

	public void setLineVisibility(int visibility) {
		line.setVisibility(visibility);
	}

	@Override
	public void setBackgroundResource(int resid) {
		mButton.setBackgroundResource(resid);
	}

}
